<template>
    <div class="hot-list">
        <div class="list-item" v-for="(item) in list" :key="item.id" @click="$emit('selected', item)">{{item.schoolName}}</div>
    </div>
</template>

<script>
    export default {
        props: {
            list: {
                type: Array,
                default: []
            }
        }

    }
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
    @function toRem($rpx){  //$rpx为需要转换的字号
        @return #{$rpx * 100 / 750 / 4}rem; 
    }
    .hot-list{
        margin-top: toRem(28);
        padding-left: toRem(20);
        .list-item{
            font-size: toRem(24);
            color: #333;
            margin-bottom: toRem(57);
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            &:last-child{
                margin-bottom: 0;
            }
        }
        
    }
 
</style>
